The C# major chord is the five chord of F# minor, so technically you have a quick modulation into the key of F# Harmonic minor.
The D13#11 chord is not that dissonant (thanx to the #11) and resolves nicely to the Emaj.
The G#7 chord at the end would be the five chord of C#minor, which is the relative minor to Emajor.
There are no rules to theory and song composition, only guidelines to help us create, understand, and converse among each other.
Good Luck!