My phone wont stop turning on and turning off by itself, and everytime it boots up (after the HTC logo and AT&T logo) it goes black for a long time instead of showing the Windows Phone logo.
Search the web for "<model name> hard reset" and follow the button press method. You may want to plug in to power since it's stuck in a boot loop. The battery is probably pretty low by now.