Try jumping the solenoid with a screwdriver. If it starts readily, either the solenoid is bad or one of the safety switches (kickstand, brake) have bad connection.
The fact that it eventually starts makes me think the solenoid is most likely stuck. It can also stick open leaving the starter running forever until you disconnect the battery.